package com.excilys.training.ebanking.web.test;

import org.junit.Before;
import org.junit.Test;

import com.thoughtworks.selenium.DefaultSelenium;

public class SelectionListOperationsIT extends SeleniumTest {

	@Before
	public void setUp() throws Exception {
		selenium = new DefaultSelenium("localhost", 4444, "*chrome",
				"http://localhost:8080/");
		selenium.start();
	}

	@Test
	public void testSelectionListOperations() throws Exception {
		selenium.open("/web/index.html");
		selenium.type("id=j_username", "romain");
		selenium.type("id=j_password", "test");
		selenium.click("name=validation");
		selenium.waitForPageToLoad("30000");
		selenium.click("link=LIVRE JEUNE");
		selenium.waitForPageToLoad("30000");
		selenium.select("name=moisChoisi", "label=Juil");
		selenium.click("css=input[type=submit]");
		selenium.waitForPageToLoad("30000");
	}

}